const Mock = require('mockjs');

// 列表
Mock.mock('/task/reportList', 'get', {
  "success": true,
  "message": "success",
  "code": 200,
  "timestamp": 1535082178117,
  "result": {
    "content": [{
      "id": "16739222421508096",
      "createBy": "",
      "createTime": "2018-06-06 18:48:02",
      "updateBy": "",
      "updateTime": "2018-06-06 18:57:55",
      "delFlag": 0,
      "applyTime": "2018-06-06 18:48:02",
      "taskNo": "20180825000001",
      "taskType": 1,
      "applyUser": {
        "id": "16739222421508096",
        "name": "张三"
      },
      "taskStatus": "0",
      'partNumber': '0001',
      'partGraphNumber': 'G00001',
      'partName': '测试零件',
      'batchNumber': '20180825-001',
      'materialNo': 'M00001',
      'projectNo': 'P-001',
      'sampleStatusPhase': 1,
      'acceptTime': "2018-06-06 18:48:02",
      'reportTime': "2018-06-06 18:48:02"
    }],
    "pageable": {
      "offset": 0,
      "pageSize": 10,
      "pageNumber": 0,
    },
    "totalElements": 4,
    "totalPages": 1,
    "size": 10,
  }
});

// 报告附件上传
Mock.mock('/task/uploadAttach', 'post', {
  "success": true,
  "message": "success",
  "code": 200,
  "timestamp": 1535082178117,
  "result": {
    "id": "a-000001",
    "url": "/upload/attach/2018-08-25/xxxx-001.xls"
  }
});

// 报告附件删除
Mock.mock('/task/attatchDelete', 'post', {
  "success": true,
  "message": "success",
  "code": 200,
  "timestamp": 1535082178117
});

// 撤回
Mock.mock('/task/drawReport', 'post', {
  "success": true,
  "message": "success",
  "code": 200,
  "timestamp": 1535082178117
});
